<script type="text/javascript">
	window.app = window.app || {};
	window.app.config = window.app.config || {};
	window.app.config.statApi = "<?php echo $config['api']; ?>";
	window.app.config.tableList = <?php echo json_encode($config,JSON_UNESCAPED_UNICODE); ?>;
</script>
<script src="https://cdn.bootcss.com/angular.js/1.5.8/angular.js"></script>
<!-- <script src="/houtai/js/echarts/echarts.js"></script> -->
<script src="/houtai/js/echarts/echarts.common.min.js"></script>
<script src="/houtai/lib/common_ng.js"></script>
<div class="formbody" ng-app="statApp" ng-controller="statCtrl">

	<div class="formtitle">
		 <span ng-click="showTab(tabs.list)" ng-class="getTabClass(tabs.list)">详细记录</span>
		 <span ng-click="showTab(tabs.chart)" ng-class="getTabClass(tabs.chart)">统计图表</span>
	    <!-- <span ng-click="showTab(tabs.test)" ng-class="getTabClass(tabs.test)">测试</span> -->
	</div>

	<!-- 详细记录 -->
	<div class="tab-item" ng-show="currTab===tabs.list" ng-controller="listCtrl">
		<table-list
			list    = "list"
			total-rows = "totalRows"
			on-params-change = 'onParamsChange(params)'
			curr-page = "params.page"
		></table-list>
	</div>
	<!-- END 详细记录 -->
	<!-- 统计图表 -->
	<div class="tab-item" ng-show="currTab===tabs.chart" ng-controller="chartCtrl">
		<table class="tablelist stat-table">
			<tr ng-repeat="(rowIndex, row) in statData">
				<th ng-bind="row.th"></th>
				<td ng-bind="row.td"></td>
			</tr>
		</table>
		<table class="tablelist">
			<thead>
				<tr>
					<th ng-repeat="th in thItems" ng-bind="th"></th>
				</tr>
			</thead>
			<tbody>
				<caption>&nbsp;</caption>
				<tr ng-repeat="(rowIndex,row) in tdList">
					<td ng-repeat="(tdIndex, td) in row track by $index" ng-bind="td"></td>
				</tr>
			</tbody>
		</table>
		<chart id="main" ></chart>
	</div>
	<!-- END 统计图表 -->

	<div class="tab-item" ng-show="currTab===tabs.test" ng-controller="testCtrl">

	</div>

</div>




<script type="text/javascript" src="/houtai/js/stat.js"></script>



